home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: 2001 Haziran
/
CHIP Haziran2001.iso
/
prog
/
haziran
/
19
/
setup.exe
/
data.z
/
cmos_lib.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-04-11
|
1KB
|
58 lines
//////////////////////////////////////////////////////////////////////
// File - cmos_lib.h
//
// Library for accessing the CMOS on the motherboard directly,
// Code was generated by WinDriver Wizard.
// Application uses WinDriver to access hardware.
//
//////////////////////////////////////////////////////////////////////
#ifndef _CMOS_LIB_H_
#define _CMOS_LIB_H_
// 'windrvr.h' is located in the WinDriver include directory,
#include "../../include/windrvr.h"
#include "../shared/bits.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
CMOS_IO = 0,
CMOS_ITEMS = 1
} CMOS_ADDR;
// IO ranges definitions
enum { CMOS_IO_ADDR = 0x70 };
enum { CMOS_IO_BYTES = 0x2 };
// CMOS register definitions
enum { CMOS_Address_OFFSET = 0x0 };
enum { CMOS_Data_OFFSET = 0x1 };
typedef struct CMOS_STRUCT *CMOS_HANDLE;
typedef struct CMOS_STRUCT
{
HANDLE hWD;
WD_CARD_REGISTER cardReg;
} CMOS_STRUCT;
BOOL CMOS_Open (CMOS_HANDLE *phCMOS);
void CMOS_Close(CMOS_HANDLE hCMOS);
BYTE CMOS_Read (CMOS_HANDLE hCMOS, BYTE addr);
void CMOS_Write (CMOS_HANDLE hCMOS, BYTE addr, BYTE data);
// this string is set to an error message, if one occurs
extern CHAR CMOS_ErrorString[];
#ifdef __cplusplus
}
#endif
#endif